{% if field.field.widget.bootstrap %}
    {% with bootstrap=field.field.widget.bootstrap %}
        {% if prepend %}
            {% if append %}
                {% include "bootstrap_toolkit/field_prepend_append.html" %}
            {% else %}
                {% include "bootstrap_toolkit/field_prepend_append.html" with append=bootstrap.append %}
            {% endif %}
        {% else %}
            {% if append %}
                {% include "bootstrap_toolkit/field_prepend_append.html" with prepend=bootstrap.prepend %}
            {% else %}
                {% include "bootstrap_toolkit/field_prepend_append.html" with prepend=bootstrap.prepend append=bootstrap.append %}
            {% endif %}
        {% endif %}
    {% endwith %}
{% else %}
    {% include "bootstrap_toolkit/field_prepend_append.html" %}
{% endif %}
